﻿using System.Xml.Serialization;

namespace BBICMS.Infrastructure.Configs
{
    /// <summary>
    /// 全局设置
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class GlobalSettings
    {
        /// <summary>
        /// 网站名称
        /// </summary>
        [XmlElement("siteName")]
        public string SiteName { get; set; }

        /// <summary>
        /// 域名
        /// </summary>
        [XmlElement("siteDomainName")]
        public string SiteDomainName { get; set; }

        /// <summary>
        /// 开发者域名
        /// </summary>
        [XmlElement("developer")]
        public string Developer{ get; set; }
        /// <summary>
        /// 开发者域名
        /// </summary>
        [XmlElement("developerDomainName")]       
        public string DeveloperDomainName { get; set; }

        /// <summary>
        /// 备案号
        /// </summary>
        [XmlElement("webNumber")]
        public string WebNumber { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        [XmlElement("version")]
        public string Version { get; set; }

        /// <summary>
        /// 百度统计ID
        /// </summary>
        [XmlElement("baiduSiteID")]
        public string BaiduSiteID { get; set; }
        
        /// <summary>
        /// 缓存时间
        /// </summary>
        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }
          
    }


    /// <summary>
    /// 文件管理器
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class FileSettings
    {

        [XmlElement("ModuleName")]
        public string ModuleName { get; set; }

        [XmlElement("RootDirectory")]
        public string RootDirectory { get; set; }

        [XmlElement("ExtensionDir")]
        public string ExtensionDir { get; set; }

        [XmlElement("IconClass")]
        public string IconClass { get; set; }

    }


    /// <summary>
    /// Category configs
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class CategorySettings
    {
        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }
        [XmlElement("PageSize")]
        public int PageSize { get; set; }
    }

    /// <summary>
    /// 日志设置
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class LogSettings
    {
        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }
        [XmlElement("PageSize")]
        public int PageSize { get; set; }      
    }


    /// <summary>
    /// 微信设置
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class WeiXinSettings
    {

        [XmlElement("Token")]
        public string Token { get; set; }

        [XmlElement("AppId")]
        public string AppId { get; set; }

        [XmlElement("AppSecret")]
        public string AppSecret { get; set; }

        [XmlElement("AccessToken")]
        public string AccessToken { get; set; }

        [XmlElement("ExpiresIn")]
        public int ExpiresIn { get; set; }



        [XmlElement("JsapiTicket")]
        public string JsapiTicket { get; set; }

        [XmlElement("TicketExpiresIn")]
        public int TicketExpiresIn { get; set; }

}

    

    /// <summary>
    /// 联系表单设置
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class ContactSettings
    {
        /// <summary>
        /// 公司名称
        /// </summary>
        [XmlElement("companyName")]
        public string CompanyName { get; set; }

        [XmlElement("companyShortName")]
        public string CompanyShortName { get; set; }

        [XmlElement("address")]
        public string Address { get; set; }

        [XmlElement("coordinate")]
        public string Coordinate { get; set; }

        [XmlElement("contactMan")]
        public string ContactMan { get; set; }

        [XmlElement("fax")]
        public string Fax { get; set; }

        [XmlElement("phone")]
        public string Phone { get; set; }

        [XmlElement("zipCode")]
        public string ZipCode { get; set; }
        [XmlElement("mobile")]
        public string Mobile { get; set; }

        [XmlElement("mailTo")]
        public string MailTo { get; set; }

        [XmlElement("mailCC")]
        public string MailCC { get; set; }      
    }

    /// <summary>
    /// 社交设置
    /// </summary>
    [XmlRoot("Settings")]//serializable attribute
    public class SocialSettings
    {
        
        [XmlElement("Oicq")]
        public string Oicq { get; set; }

        [XmlElement("OicqTwo")]
        public string OicqTwo { get; set; }

        [XmlElement("SinaWeibo")]
        public string SinaWeibo { get; set; }

        [XmlElement("WeiXing")]
        public string WeiXing { get; set; }

        [XmlElement("WeiXingCode")]
        public string WeiXingCode { get; set; }

        
    }
   
    /// <summary>
    /// 角色设置
    /// </summary>
    [XmlRoot("Settings")]
    public class RoleSettings
    {
        [XmlElement("modelName")]
        public string ModelName { get; set; }

        [XmlElement(DataType = "boolean", ElementName = "enableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "cacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement("iconClass")]
        public string IconClass { get; set; }

        [XmlElement(DataType = "int", ElementName = "Founder")]
        public int Founder { get; set; }
        
    }

    /// <summary>
    /// 用户设置
    /// </summary>
    [XmlRoot("Settings")]
    public class UserSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "enableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "cacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "pageSize")]
        public int PageSize { get; set; }

        [XmlElement("DefaultAvatar")]
        public string DefaultAvatar { get; set; }
        /// <summary>
        /// 创始人
        /// </summary>
        [XmlElement("Founder")]
        public string Founder { get; set; }
    }

    /// <summary>
    /// Carousel config
    /// </summary>
    [XmlRoot("Settings")]
    public class CarouselSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

        [XmlElement("IconClass")]
        public string IconClass { get; set; }

    }

    /// <summary>
    /// Page config
    /// </summary>
    [XmlRoot("Settings")]
    public class ProductSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

    }

    /// <summary>
    /// Page config
    /// </summary>
    [XmlRoot("Settings")]
    public class ArticleSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

    }


    /// <summary>
    /// Work config
    /// </summary>
    [XmlRoot("Settings")]
    public class WorkSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

    }

    /// <summary>
    /// Document config
    /// </summary>
    [XmlRoot("Settings")]
    public class DocumentSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

    }
    /// <summary>
    /// Page config
    /// </summary>
    [XmlRoot("Settings")]
    public class PageSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }     

    }

    /// <summary>
    /// PageMeta config
    /// </summary>
    [XmlRoot("Settings")]
    public class PageMetaSettings
    {
        [XmlElement(DataType = "boolean", ElementName = "EnableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "CacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "PageSize")]
        public int PageSize { get; set; }

      

    }



    /// <summary>
    /// 菜单设置
    /// </summary>
    [XmlRoot("Settings")]
    public class MenuSettings
    {

        [XmlElement(DataType = "boolean", ElementName = "enableCaching")]
        public bool EnableCaching { get; set; }

        [XmlElement(DataType = "int", ElementName = "cacheDuration")]
        public int CacheDuration { get; set; }

        [XmlElement(DataType = "int", ElementName = "pageSize")]
        public int PageSize { get; set; }

    

        /// <summary>
        /// 后台菜单固定ID
        /// </summary>
        [XmlElement(DataType = "int", ElementName = "BackMenuCId")]
        public int BackMenuCId { get; set; }

    }


    /// <summary>
    /// 邮件服务设置
    /// </summary>
    [XmlRoot("Settings")]
    public class SMTPSettings
    {
        [XmlElement("From")]
        public string From { get; set; }

        [XmlElement(DataType = "string", ElementName = "SmtpServer")]
        public string SmtpServer { get; set; }

        [XmlElement(DataType = "int", ElementName = "Port")]
        public int Port { get; set; }

        [XmlElement(DataType = "string", ElementName = "UserName")]
        public string UserName { get; set; }

        [XmlElement(DataType = "string", ElementName = "Password")]
        public string Password { get; set; }

        [XmlElement(DataType = "boolean", ElementName = "EnableSsl")]
        public bool EnableSsl { get; set; }

        [XmlElement("iconClass")]
        public string IconClass { get; set; }
      


    }
}
